﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xeralabs.Common;
using Xeralabs.Core.Events;

namespace Xeralabs.Core.Kernel
{
    internal class EventPool : Pool<GDESKEvent>
    {
        //NOT CREATABLE WITHOUT PARAMS
        private EventPool() { }

        public EventPool(int maxSize)
            : base(maxSize) { }
        public EventPool(int maxSize, bool fill)
            : base(maxSize, fill) { }
        public EventPool(int maxSize, int initialObjects)
            : base(maxSize, initialObjects) { }

        public override void ReleaseObject(GDESKEvent obj)
        {
            obj.Release();
            base.ReleaseObject(obj);
        }
        protected override GDESKEvent CreateNewPoolObject()
        {
            return new GDESKEvent();
        }
    }
}
